<#--@ftlvariable name="htmlName" type="java.lang.String"-->
<#--@ftlvariable name="hobbies" type="java.util.List"-->
<#--@ftlvariable name="hobby" type="nxu.it.entity.Hobby"-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册界面</title>
    <style type="text/css">
        .field {
            margin: 1em;

        }

        h2 {
            margin: 1em;
            color: darkcyan;
        }

        h3 {
            margin: 1em;
            color: red;
        }

    </style>
</head>

<body>


<h2>
    欢迎注册
</h2>
<h3>
    <#if message??>
        ${message}
    </#if>
</h3>

<form action="./doRegister" method="post" autocomplete="off">
    <div class="field">
        <label>
            <span>账号</span>
            <input type="text" name="username" required/>
        </label>
    </div>

    <div class="field">
        <label>
            <span>密码</span>
            <input type="password" name="password"/>
        </label>
    </div>

    <div class="field">
        <span>性别</span>
        <label><input type="radio" name="sex" value="boy" checked>男</label>
        &nbsp;
        <label> <input type="radio" name="sex" value="girl">女</label>
    </div>

    <div class="field">
        <span>年龄</span>
        <input type="number" name="age"/>
    </div>

    <div class="field">
        <span>邮箱</span>
        <input type="email" name="email"/>
    </div>

    <div class="field">
        <span>爱好</span>
        <#list hobbies as hobby >
            <label> <input type="checkbox" name="hobby" value="${hobby_index}">${hobby}</label>
        </#list>
    </div>

    <div class="field">
        <span>籍贯</span>
        <select name="hometown" required width="162">
            <option value="">---请选择您的籍贯---</option>
            <#list hometown as town >
                <option value="${town_index}">${town}</option>
            </#list>
        </select>
    </div>

    <div class="field">
        <span>验证</span>
        <input type="text" name="chapter"> <img src="/doChapter" width="60" align="center"/>
    </div>

    <div class="field">
        <input type="submit">
    </div>
</form>

</body>
</html>